package com.shuoyue.adven;

import com.shuoyue.adven.entity.Adv;

import java.util.ArrayList;
import java.util.List;

public class TestUtils {
   public static List<Adv> testBAD() {
        List<Adv> Advs = new ArrayList<>();
        List<String> path = FileUtils.getPaths(CommonUtil.getPathHdmi().getAbsolutePath());

        for (int i = 0; i < 3; i++) {
            Adv Adv = new Adv();
            Adv.setType((i % 3) + 1);
            if (Adv.getType() == Adv.TYPE_RICH_TEXT)
                Adv.setFontContent("标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题");
            else if (Adv.getType() == Adv.TYPE_IMG) {
                Adv.setFontContent("http://file.cqfnculture.com/file/pcfile/file20200731144035.jpg");
            } else {
//                Adv.setContent(path.get(0));
                Adv.setFontContent("http://file.cqfnculture.com/file/pcfile/file20200630173757_f186d832f21f7d6c06ebd6e44a814389.mp4");
            }
            Adv.setTitle("标题标题标题标题标题标题标题标题");
            Adv.setLogo("http://file.cqfnculture.com/file/pcfile/file20200731144035.jpg");
            Advs.add(Adv);
        }
        return Advs;
    }

    public static  List<Adv> getTestScreen2() {
        List<String> path = FileUtils.getPaths(CommonUtil.getPathHdmi().getAbsolutePath());
        List<Adv> Advs = new ArrayList<>();
        for (int i = 0; i < 3; i++) {
            Adv Adv = new Adv();
            Adv.setType((i % 3) + 1);
            if (Adv.getType() == Adv.TYPE_RICH_TEXT)
                Adv.setFontContent("标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题");
            else if (Adv.getType() == Adv.TYPE_IMG) {
                Adv.setImgUrl("http://file.cqfnculture.com/file/pcfile/file20200731144035.jpg");
            } else {
//                Adv.setContent(path.get(0));
                Adv.setVideoUrl("http://file.cqfnculture.com/file/pcfile/file20200630173757_f186d832f21f7d6c06ebd6e44a814389.mp4");
            }
            Advs.add(Adv);
        }
        return Advs;
    }
}
